Skip to content

Wait for the job, not the whole queue - #7997

Merged
labkey-jeckels merged 1 commit into
developfrom
fb_messageDigest
Aug 31, 2026
Merged

Wait for the job, not the whole queue#7997
labkey-jeckels merged 1 commit into
developfrom
fb_messageDigest

Conversation

@labkey-jeckels

@labkey-jeckels labkey-jeckels commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Rationale

JobRunner.waitForCompletion() blocks until all jobs in the queue have completed, including those that are scheduled for future execution. That can be a long wait. Most callers want to wait until their job is complete.

Changes

  • Add JavaDoc describing the behavior
  • Switch to waiting for the job of interest

Tasks

  • Claude Code Review
  • Manual Testing - N/A
  • Test Automation - rely on existing coverage

@labkey-jeckels
labkey-jeckels requested a review from a team August 30, 2026 15:43
@labkey-jeckels labkey-jeckels self-assigned this Aug 30, 2026

@labkey-adam labkey-adam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there other callers that should be migrated?

@labkey-jeckels

Copy link
Copy Markdown
Contributor Author

Are there other callers that should be migrated?

@bbimber there are a handful of callers in BimberLabKeyModules that should likely be switched. They may be waiting much longer than needed since this change in 2022 which uses JobRunner to schedule a job for future execution.

#3510

@labkey-jeckels
labkey-jeckels merged commit 7854461 into develop Aug 31, 2026
9 of 10 checks passed
@labkey-jeckels
labkey-jeckels deleted the fb_messageDigest branch August 31, 2026 17:48
@bbimber

bbimber commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

@labkey-jeckels, huh, that's interesting. I dont think I've seen the 'wait for whole queue behavior', but I will look at this.

@labkey-jeckels

Copy link
Copy Markdown
Contributor Author

@labkey-jeckels, huh, that's interesting. I dont think I've seen the 'wait for whole queue behavior', but I will look at this.

Your use cases may not trigger calls to SimpleMetricsService, or may only trigger them very intermittently

@bbimber

bbimber commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

OK. In any case, these are all simple to migrate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants